import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Main from '../views/Main.vue'
import CategoryEdit from '../views/CategoryEdit.vue'
import CategoryList from '../views/CategoryList.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: Main,
    children:[
      {path:'/Categories/create',component:CategoryEdit},
      {path:'/Categories/edit/:id',component:CategoryEdit,props:true},
      {path:'/Categories/list',component:CategoryList}
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
